package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bootdo.system.domain.TbWithdrawal;
import com.bootdo.system.mapper.TbWithdrawalMapper;
import com.bootdo.system.service.TxService;


@Service
public class TxServiceImpl implements TxService{
	
	@Autowired
    private TbWithdrawalMapper wm;
	
	@Override
	public List<TbWithdrawal> list(Map<String, Object> map) {
		return wm.list(map);
	}

	@Override
	public int insert2update(TbWithdrawal table) {
		int res=0;
		if(table != null) {
			Integer id = table.getId();
			if(id != null) {
				res=wm.updateByPrimaryKeySelective(table);
			}else {
				res=wm.insertSelective(table);
			}
		}
		return res;
	}

	@Override
	public int count(Map<String, Object> map) {
		return wm.count(map);
	}

	@Override
	public String getNum(Integer userId) {
		return wm.getNum(userId);
	}

}
